package com.tuanzi.loan.business.service.extend.impl;

import com.tuanzi.loan.business.entity.extend.ExtendInfo;
import com.tuanzi.loan.business.repository.extend.ExtendInfoRepository;
import com.tuanzi.loan.business.service.extend.ExtendInfoService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.service.CommonServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author zzw
 */
@Debug
@Service
@Transactional
public class ExtendInfoServiceImpl extends CommonServiceImpl<ExtendInfo, String> implements ExtendInfoService {

	@Autowired
	private ExtendInfoRepository extendInfoRepository;

	@Autowired
	private StringRedisTemplate stringRedisTemplate;


	@Override
	protected JpaRepository<ExtendInfo, String> getRepository() {
		return extendInfoRepository;
	}

	@Override
	public List<ExtendInfo> findExtendInfoByProductId(Long productId) {
		return extendInfoRepository.findExtendInfosByProductId(productId);
	}
}
